package jdk10;

public class VarTest {


    public void testVar(){
        var x = new MyClassA();
        print(x);
    }

    private void print(MyInterface my){
        my.test();
    }
}

interface MyInterface{
    void test();
}

class MyClassA implements MyInterface{

    @Override
    public void test() {
        System.out.println(123);
    }
}